package org.zhaolei.feign;


import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.zhaolei.request.NewUserCouponRequest;
import org.zhaolei.util.JsonData;

//这里的url除了写死还能在哪里配置？？？
@FeignClient(name = "xdclass-coupon-service", url = "http://localhost:9002")
public interface CouponFeignService {

    /**
     * 新用户发放优惠券
     * @param newUserCouponRequest
     * @return
     */
    @PostMapping("/api/coupon/v1/new_user_coupon")
    JsonData addNewUserCoupon(@RequestBody NewUserCouponRequest newUserCouponRequest);

}
